package com.zyong.design.pattern.mediator.case2;

/**
 * @program: zyong-design-pattern
 * @ClassName: Client
 * @author: zyong
 * @create: 2024-04-04 21:57
 */
public class Client {
    public static void main(String[] args) {
        Mediator mediator = new ConcreteMediator();

        Alarm alarm = new Alarm(mediator, "alarm");
        CoffeeMachine coffeeMachine = new CoffeeMachine(mediator, "coffeeMachine");
        Curtains curtains = new Curtains(mediator, "curtains");
        Tv tv = new Tv(mediator, "tv");

        alarm.sendAlarm(0);

        coffeeMachine.finishCoffee();

        alarm.sendAlarm(1);

        curtains.downCurtains();

        tv.stopTv();
    }
}
